package drama;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import roles.GeLi;

@Component
public class MoAttack{

    @Autowired
    private GeLi geli;



    //构造函数注入
/*    public MoAttack(GeLi geli) {
        this.geli = geli;
    }*/


    //属性注入（setter方法）

    public void setGeli(GeLi geli) {
        this.geli = geli;
    }

    //接口注入
/*    @Override
    public void injectGeli(GeLi geli) {
        this.geli = geli;

    }*/
    public void cityGateAsk(){
        System.out.println("来者何人？");
        geli.responseAsk("墨者革离");
    }


}
